﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>jQuery EasyUI Extensions - Examples,jQuery,EasyUI,插件,扩展,datagrid,tree,treegrid,panel,tabs,form,validatebox,menu,linkbutton,combo,window,dialog</title>
    <meta name="keywords" content="jquery,easyui,datagrid,tree,treegrid,messager,menu,panel,tabs,layout,window,dialog,form,validatebox,linkbutton,combo,jqext,jquery-extensions,plugin,扩展,插件" />
    <meta name="description" content="jquery-extensions,基于jQuery和EasyUI的丰富插件扩展功能集合,提供包含jEasyUI中诸多插件如 panel、tabs、layout、menu、linkbutton、menu、form、validatebox、combo、window、dialog、datagrid、tree、treegrid 等的扩展功能集合。" />

    <link href="../jquery-easyui-theme/default/easyui.css" rel="stylesheet" type="text/css" />
    <link href="../jquery-easyui-theme/icon.css" rel="stylesheet" type="text/css" />
    <script src="../jquery/jquery-1.11.1.js" type="text/javascript"></script>
    <script src="../jquery-easyui-1.3.6/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="../jquery-easyui-1.3.6/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>

    <script src="../jquery.jdirk.js" type="text/javascript"></script>
    <link href="../jeasyui-extensions/jeasyui.extensions.css" rel="stylesheet" type="text/css" />
    <script src="../jeasyui-extensions/jeasyui.extensions.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jeasyui.extensions.linkbutton.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jeasyui.extensions.form.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jeasyui.extensions.validatebox.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jeasyui.extensions.combo.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jeasyui.extensions.combobox.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jeasyui.extensions.menu.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jeasyui.extensions.searchbox.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jeasyui.extensions.panel.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jeasyui.extensions.window.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jeasyui.extensions.dialog.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jeasyui.extensions.layout.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jeasyui.extensions.tree.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jeasyui.extensions.datagrid.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jeasyui.extensions.treegrid.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jeasyui.extensions.combogrid.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jeasyui.extensions.combotree.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jeasyui.extensions.tabs.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jeasyui.extensions.theme.js" type="text/javascript"></script>

    <link href="../icons/icon-all.css" rel="stylesheet" type="text/css" />
    <script src="../icons/jeasyui.icons.all.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jeasyui.extensions.icons.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jeasyui.extensions.gridselector.js" type="text/javascript"></script>

    <link href="../plugins/codemirror-4.3/lib/codemirror.css" rel="stylesheet" />
    <script src="../plugins/codemirror-4.3/lib/codemirror.js"></script>
    <script src="../plugins/codemirror-4.3/mode/xml/xml.js"></script>
    <script src="../plugins/codemirror-4.3/mode/javascript/javascript.js"></script>
    <script src="../plugins/codemirror-4.3/mode/vbscript/vbscript.js"></script>
    <script src="../plugins/codemirror-4.3/mode/css/css.js"></script>
    <script src="../plugins/codemirror-4.3/mode/htmlmixed/htmlmixed.js"></script>

    <script src="../jeasyui-extensions/jquery.toolbar.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jquery.comboicons.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jquery.comboselector.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jquery.my97.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jquery.portal.js" type="text/javascript"></script>
    <script src="../jeasyui-extensions/jquery.ueditor.js"></script>
    <script src="../jeasyui-extensions/jquery.codemirror.js"></script>

    <script type="text/javascript">
        $(function () {

            $("#btn1").click(function () {
                $("#t2").codemirror("enable");
            });
            
            $("#btn2").click(function () {
                $("#t2").codemirror("disable");
            });

            $("#btn3").click(function () {
                alert($("#t2").codemirror("getValue"));
            });

            $("#btn4").click(function () {
                $("#t2").codemirror("setValue", "abcd");
            });

            $("#btn5").click(function () {
                $("#t2").codemirror("reset");
            });

            $("#btn6").click(function () {
                $("#t2").codemirror("focus");
            });

            $("#btn7").click(function () {
                $("#t2").codemirror("clear");
            });

            $("#btn8").click(function () {
                $("#t2").codemirror("destroy");
            });

            $("#btn9").click(function () {
                $("#t2").codemirror("show");
            });

            $("#btn10").click(function () {
                $("#t2").codemirror("hide");
            });
        });
    </script>
</head>
<body>
    <input id="btn1" type="button" value="enable" />
    <input id="btn2" type="button" value="disable" />
    <input id="btn3" type="button" value="getValue" />
    <input id="btn4" type="button" value="setValue" />
    <input id="btn5" type="button" value="reset" />
    <input id="btn6" type="button" value="focus" />
    <input id="btn7" type="button" value="clear" />
    <input id="btn8" type="button" value="destroy" />
    <input id="btn9" type="button" value="show" />
    <input id="btn10" type="button" value="hide" />
    <hr />
    <textarea id="t2" class="easyui-codemirror" data-options="mode: 'text/html', lineNumbers: true, width: 600, height: 300">
        <script type="text/javascript">
            $(function () {
                var editor = CodeMirror.fromTextArea($("#t1")[0], {
                    lineNumbers: true,
                    mode: "text/html",
                    readOnly: "nocursor"
                });

                $("#btn1").click(function () {
                    editor.execCommand("selectAll");
                });
            });
        </script>
    </textarea>
</body>
</html>
